<?php
namespace Admin\Controller;
use Common\Controller\BackendController;

class ArticleToutiaoController extends BackendController
{
    public function _initialize()
    {
        parent::_initialize();
        $this->_mod = D('ArticleToutiao');
    }
    public function ajax_getchilds()
    {
        $id = $this->_get('id', 'intval');
        $map = array('pid' => $id);
        $return = $this->_mod->field('id,name')->where($map)->select();
        if ($return) {
            $this->ajaxReturn(1, L('operation_success'), $return);
        } else {
            $this->ajaxReturn(0, L('operation_failure'));
        }
    }
}